package com.makinolo.rlvforge.tacx.data
{
	import flash.utils.ByteArray;
	

public class RLVFrameDistanceMapping implements Persistent
{
	public static const RECORD_SIZE:int = 8;
	
	private var FrameNumber:Number;
	private var DistancePerFrame:Number;
	
	
/*	public RLVFrameDistanceMapping(LEDataInputStream dis) throws IOException	
	{
		FrameNumber = dis.readUnsignedInt();
		DistancePerFrame = dis.readFloat();
	}*/
	
	public function RLVFrameDistanceMapping(frameNumber:Number, distancePerFrame:Number)
	{		
		FrameNumber = frameNumber;
		DistancePerFrame = distancePerFrame;
	}
	
	public function getDistancePerFrame():Number
	{
		return DistancePerFrame;
	}
	public function setDistancePerFrame(distancePerFrame:Number):void
	{
		DistancePerFrame = distancePerFrame;
	}
	public function getFrameNumber():Number
	{
		return FrameNumber;
	}
	public function setFrameNumber(frameNumber:Number):void
	{
		FrameNumber = frameNumber;
	}
	
	public function persist(dos:ByteArray):void
	{
		dos.writeUnsignedInt(FrameNumber);
		dos.writeFloat(DistancePerFrame);		
	}
}

}